package 数组.easy;

/**
 * EASY
 */

import java.util.Arrays;

/**
 * @author Lw中
 * @date 2020/8/2 20:49
 */
public class LuQiSi {

    public static int findLengthOfLCIS(int[] nums) {
        if (nums.length <= 1) {
            return nums.length;
        }
        int count = 1;
        int highest = 1;
        // for循环边界值是0<i<num.length-1，因为循环体内要取num[i+1]
        for (int i = 0; i < nums.length - 1; i++) {
            if(nums[i] < nums[i+1]) {
                count++;
            } else {
                count = 1;
            }
            highest = highest > count ? highest : count;
        }
        return highest;
    }

    public static void main(String[] args) {
        int[] array = {1,1,1,1,1};
        int result = findLengthOfLCIS(array);
        System.out.println(result);
    }

}
